<?php
	$s = file_get_contents("./xkxx.csv");
	$array = explode(",",$s);
	//var_dump($array);
	$n = (count($array)-1)/12;
	//echo $m = count($array);
	for($i=1;$i<$n;$i++){
	
	//选课状态的处理（存在空信息）
		$t = (12*$i)+5;
		if($array[$t] === '未定'){
			$array[$t] = '0';
		}else if($array[$t] == "确定"){
			$array[$t] = '1';
		}else{
			$array[$t] = '2';
		}
		//echo $array[$t]."<br />";
	
	//上课周次信息处理
		$t1 = $t + 5;
		
	}
	var_dump($array);	
?>